package org.test;

import java.sql.Connection;
import java.sql.DriverManager;

public class Hello {
	
	public String generateHello() {
		String[] vals = new String[4];
		vals[0] = "Hello";
		vals[1] = ", ";
		vals[2] = "World";
		vals[3] = "!";
		String result = "";
		for (int i = 0; i < vals.length; i++) {
			/* should be done with a StringBuffer */			
			result += vals[i];
		}
		return result;
	}
	
	public void jdbcRun() throws Exception {
		Connection conn = DriverManager.getConnection("jdbc_url");
		conn.createStatement().execute("SELECT 1");
		/* only statement is closed, not the connection */ 
		conn.close();
		for (int i = 0; i < 10; i++) {
			System.out.println(i);
		}
		System.out.println(generateHello());
	}
	
}
